package threads;

import java.util.Timer;
import java.util.TimerTask;

public class E8 {

  /**
   * @param args
   */
  public static void main(String[] args) {

    Timer timer = new Timer();

    TimerTask task = new TimerTask() {

      @Override
      public void run() {
        try {
          int count = 0;
          while (count < 3) {
            System.out.println("beep");
            Thread.sleep(1000);
            count++;
          }
        } catch (InterruptedException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
    };
    timer.schedule(task, 1000*60, 1000*60);
    doTheCalculations();
  }
  private static void doTheCalculations() {
    // calculations
  }
}
